﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imaginecup.sprite.changeSourceSize;
using imaginecup.util;
using Imaginecup.util.resourceMan;
using Microsoft.Xna.Framework;

namespace Imaginecup.sprite.util
{
    public class ChangeSourceSizeUtil:ISourceInfoClass 
    {
        private EntityInfo m_SourceInfo;
                
        public ISprite GetChangeSourceSizeUtil(String TextureName)
        {
            ChangeSourceSizeSprite sprite = new ChangeSourceSizeSprite();
            sprite.SetTextureName(TextureName);
            sprite.SetSourceInfoClass(this);

            Vector2 size = ResourceMan.GetResourceMan().GetFrameSize(TextureName);
            m_SourceInfo = new EntityInfo(0 , 0 , (int)size.X , (int)size.Y);
            return sprite;
        }

        public EntityInfo GetSourceInfo()
        {
            return m_SourceInfo;
        }
        
    }
}
